if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
AC_MSG_RESULT(yes)
build_recorder=true
- recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11"
+ recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11 gtk+-3.0"
PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
else
AC_MSG_RESULT(no)
#define GST_USE_UNSTABLE_API
#include <gst/gst.h>
+#include <gtk/gtk.h>
+
#include "shell-recorder-src.h"
#include "shell-recorder.h"
#include "shell-screen-grabber.h"
GstElement *pipeline;
GstElement *src;
int outfile;
+ char *filename;
};
static void recorder_set_stage (ShellRecorder *recorder,
* be opened.
*/
static int
-recorder_open_outfile (ShellRecorder *recorder)
+recorder_open_outfile (ShellRecorder *recorder,
+ char **outfilename)
{
const char *pattern;
int flags;
{
g_printerr ("Recording to %s\n", path);
+ if (outfilename != NULL)
+ *outfilename = path;
+ else
+ g_free (path);
g_string_free (filename, TRUE);
- g_free (path);
+
goto out;
}
return TRUE;
}
- pipeline->outfile = recorder_open_outfile (pipeline->recorder);
+ pipeline->outfile = recorder_open_outfile (pipeline->recorder,
+ &pipeline->filename);
if (pipeline->outfile == -1)
goto out;
if (pipeline->outfile != -1)
close (pipeline->outfile);
+ g_free (pipeline->filename);
+
g_clear_object (&pipeline->recorder);
g_free (pipeline);
if (pipeline->recorder)
{
+ GtkRecentManager *recent_manager;
+ GFile *file;
+ char *uri;
+
ShellRecorder *recorder = pipeline->recorder;
if (pipeline == recorder->current_pipeline)
{
shell_recorder_close (recorder);
}
+ recent_manager = gtk_recent_manager_get_default ();
+
+ file = g_file_new_for_path (pipeline->filename);
+ uri = g_file_get_uri (file);
+ gtk_recent_manager_add_item (recent_manager,
+ uri);
+ g_free (uri);
+ g_object_unref (file);
+
recorder->pipelines = g_slist_remove (recorder->pipelines, pipeline);
}
#define GST_USE_UNSTABLE_API
#include "shell-recorder.h"
#include <clutter/clutter.h>
+#include <gtk/gtk.h>
#include <gst/gst.h>
/* Very simple test of the ShellRecorder class; shows some text strings
ClutterAnimation *animation;
ClutterColor red, green, blue;
+ gtk_init (&argc, &argv);
gst_init (&argc, &argv);
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;